import { request } from './request'

//获取所有博客
export function allBlogs(page, size) {
    return request({
        url: `/blog/articles/hot/${page}/${size}`
    })
}

//获取所有博客(热门的帖子)
export function hotBlogs(page, size) {
    return request({
        url: `/blog/articles/desc/${page}/${size}`
    })
}

//获取父级分类数据
export function getNavBar() {
    return request({
        url: '/blog/parnav/list'
    })
}

//根据标签获取对应博客内容
export function getArticlesByPSid(parid, subid, page, size) {
    return request({
        url: `/blog/articles/list/${parid}/${subid}/${page}/${size}`
    })
}

//根据id查询博客
export function singleBlogs(id) {
    return request({
        url: `/blog/articles/list/${id}`
    })
}